import React, { Component } from 'react';

@testable(false)
class Decorator extends Component {
  constructor(props) {
    super(props);
    
  }

  render () {
    return (
      <div>
        this is for test Decorator!
      </div>
    )
  }
}
// 装饰器可以接受参数，意味着可以修改修饰器的行为
function testable(isTestbale) {
  // 再封装一层函数
  return function (target) {
    target.isTestbale = isTestbale;
  }
}
console.log(Decorator.isTestbale)

export default Decorator